Conventionally, in the field of switching power supply circuits, there has been developed a technique for making constant a output current with respect to a load variation. As such a technique, for example, Patent Document 1 discloses a technique of detecting a time in which a secondary current flows through a transformer and making constant a ratio of the time to a switching cycle, namely, an on-duty ratio of the secondary current.
A switching power supply circuit disclosed in Patent Document 1 (FIG. 1 of Patent Document 1) is a flyback type switching power supply circuit that has a semiconductor device 100, a transformer 110, diodes 121 and 141, capacitors 122 and 142, and resistors 151 and 152, and in which a predetermined direct current output voltage V0 is generated from a direct current input voltage VIN and supplied to a load 130. The transformer 110 includes a primary coil 111, a secondary coil 112, and an auxiliary coil 113.
In the semiconductor device 100, a switching element 1, a drain current detection circuit 2, a drain current restriction circuit 3, an error amplifier 4, a PFM (pulse frequency modulation) control circuit 5, a secondary current on-period detection circuit 6, a secondary current detection delay time correction circuit 7, a secondary current on-duty control circuit 8, a clock signal selection circuit 9, a flip-flop circuit 10, a NAND circuit 11, a gate driver 12, an on-time blanking pulse generation circuit 13, an AND circuit 14, and a regulator 15 are integrated.
The secondary current on-period detection circuit 6 (FIG. 2 of Patent Document 1) includes one-pulse signal generation circuits 21 and 23, a comparator 22, and a flip-flop circuit 24. The secondary current detection delay time correction circuit 7 includes a constant current source 31, a capacitor 32, an inverter 33, and a switch 34. The secondary current on-duty control circuit 8 includes switches 41 and 42, a capacitor 43, a constant current source 44, N-channel type MOS (metal oxide semiconductor) field-effect transistors 45 and 46, a comparator 47, a reference voltage source 48, an AND circuit 49, and a one-pulse signal generation circuit 50.
FIG. 3 of Patent Document 1 illustrates a timing chart showing a voltage waveform and a current waveform at various portions of the switching power supply circuit. This timing chart depicts an auxiliary coil voltage VTR obtained by dividing a voltage appearing at one end of the auxiliary coil 113, a primary current Ids that flows through the switching element 1, and a secondary current I2p that flows through the secondary coil 112.
Herein, it is assumed that T1 denotes a first period during which the secondary current I2p flows, T2 denotes a second period during which the secondary current I2p does not flow, T3 denotes a third period that is a combination of the first period T1 and the second period T2, Ipk1 denotes a peak value of the primary current Ids, and Ipk2 denotes a peak value of the secondary current I2p. 
An average output current Iout supplied from the switching power supply circuit to the load 130 is an average value of the secondary current I2p.An average value of the secondary current I2p in the first period T1 is one-half the peak value Ipk2 of the secondary current I2p. An average value of the secondary current I2p in the third period T3 is a value obtained by multiplying the average value of the secondary current I2p in the first period T1 by an on-duty ratio of the secondary current. Thus, where a number of winding turns of the primary coil 111 is denoted as N1 and a number of winding turns of the secondary coil 112 as N2, the average output current lout is expressed by an equation (1) below.Iout=(½)×(N1/N2)×(T1/T3)×Ipk1   (1)
In such a conventional switching power supply circuit, in the above equation (1), while the peak current Ipk1 of the primary current Ids is made constant by using the drain current restriction circuit 3, the on-duty ratio (T1/T3) of the secondary current is made constant by using the secondary current on-duty ratio control circuit 8 so that the average output current lout is controlled to be constant.